<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>绿色挂号</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="../css/mui.min.css" />
		<link rel="stylesheet" href="../css/main.css" />
		<style>
			/*body,
			html {
				overflow: hidden;
				height: 100%;
			}*/
			.wutu {
				text-align: center;
				padding-top: 1.8rem;
				background: transparent;
			}
		</style>
	</head>

	<body class="bg-whf6">
		<header class="mui-bar mui-bar-transparent mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">绿色挂号</h1>
			<a class="mui-btn mui-btn-link mui-pull-right" id="TL_close">关闭</a>
		</header>
		<div class="mui-content">
			<!--<iframe id="tlPayBank" name="tlPayBank" src="http://ccguahao.cn/" width="100%" height="700px" frameborder="0" scrolling="auto"></iframe>-->
		</div>
		<script type="text/javascript" src="../js/mui.min.js"></script>
		<script type="text/javascript" src="../js/jquery-3.1.1.js" ></script>
		<script type="text/javascript" src="../js/xiangyingshi.js"></script>

		<script>
			mui.plusReady(function() {
				var topoffset = '45px';
				if(plus.navigator.isImmersedStatusbar()) { // 兼容immersed状态栏模式
					// 获取状态栏高度并根据业务需求处理，这里重新计算了子窗口的偏移位置
					topoffset = (Math.round(plus.navigator.getStatusbarHeight()) + 45) + 'px';
					document.querySelector("header").style.height = topoffset;
					document.querySelector("header").style.paddingTop = "20px";
				}
				var subpage_style = {
					top: topoffset,
					bottom: '0px'
				};
				wainshow();
				//document.addEventListener("netchange", wainshow, false);

				function wainshow() {
					if(plus.networkinfo.getCurrentType() == plus.networkinfo.CONNECTION_NONE) {
						mui.toast("确认手机是否连接网络！");
						var html='<div class="mui-content-padded wutu"><img src="../images/no_data/1-01.png" style="width: 150px;"></div>'
						$(".mui-content").html(html);
					} else {
						$(".mui-content").html("");
						mui.init({
							subpages: [{
								url: "http://ccguahao.cn/",
								id: "http://ccguahao.cn/",
								styles: subpage_style
							}]
						})
						var ws = plus.webview.currentWebview(); //加载进外部网页,加载完成关闭等待框
						ws.show('slide-in-right', 50);
						plus.nativeUI.closeWaiting();

						// 加载完毕后关闭等待框，并展示页面
						var currentView = plus.webview.currentWebview();
						currentView.show('slide-in-right', 200);
						plus.nativeUI.closeWaiting();

						document.getElementById("TL_close").addEventListener("tap", function(e) {
							var ws = plus.webview.currentWebview();
							plus.webview.close(ws);
						});
					}
				}

			})
		</script>
	</body>

</html>